<?php
/*!
 * LostKids API PHP Library v0.1 
 * http://huali.li/
 *
 * Copyright 2011, 
 * Written By James Pang
 *  
 * Date: 2011/2/14
 */

interface DataManager
{
    /**
     * @return 0 if non
     */
	public function getLastMsgCursor($dataSrcKey);

	public function saveLastMsgCursor($dataSrcKey, $cursor);

    public function getMsg($lid);

    /**
     * save and assign new id
     */
	public function saveMsg($msg);

    /**
     * the msgs are a match of the user
     */
	public function saveUsersMatch($msgLids, $tobeMatched);

    /**
     * @param string $panelKey
     * @param array[uid=>confidence] $tobeMatched
     * 
     * @see Recognizer->Recognize()
     */
	public function createMatchPanel($panelKey, $tobeMatched);

    /**
     * @see BatchMessage
     */
	public function getBatchMsgs($msg);

    /**
     * check if the faceDB contains this userId
     */
	public function isUserInFaceDB($userId);

    public function updateMsgsStatus($msg, $newMsgStatus);
}
?>
